package com.baosight.risk.mapper.workflow;

import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.service.workflow.entity.WorkflowAuth;
import com.baosight.risk.service.workflow.vo.WorkflowAuthVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkflowAuthMapper extends BaseMapper<WorkflowAuth> {

    /**
     * 查询所有流程授权列表
     *
     * @param filed 搜索条件
     * @return 流程授权列表
     */
    List<WorkflowAuthVO> queryAll(String filed);

    /**
     * 根据流程定义编码查询人工活动节点
     *
     * @return 节点列表
     */
    List<WorkflowAuthVO> selectNodes(@Param("processKey") String processKey);

    /**
     * 根据流程定义编码查询授权角色
     *
     * @param processKey
     * @return 授权角色
     */
    WorkflowAuthVO selectAuthByProcessKey(@Param("processKey") String processKey, @Param("nodeKey") String nodeKey);

}